#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>

using namespace std;

#include "binfile.h"
#include "timeelapsed.h"
#include "g6.h"

int main() {
  MakeAddArrays(nPre);
  int c = 0;
  int cp = 0;
  Int64 f; 
  while(cin >> f) {    
//    cout << '.';
    int comp; cin >> comp;
    int fcomp = g6evo(f);
    c++;
    if (comp == fcomp) cp++;
    else {      
//      cout << oct << f << endl;
    }
  }
  
  cout << (double)100 * cp / c << endl;

  
  return 0;
}
